function App(): JSX.Element {
  // @ts-ignore
  const { date, number } = window.api || {}
  // @ts-ignore
  console.log('原生方法: ', window.rtcEngine.initialize)
  return (
    <>
      <h1>Electron Quickstart</h1>
      <div>{date.toString()}</div>
      <div>{number}</div>
      <div
        id="join-channel-local-video"
        style={{ width: '300px', height: '300px', float: 'left' }}
      ></div>
      <div
        id="join-channel-remote-video"
        style={{ width: '300px', height: '300px', float: 'left' }}
      ></div>
      <button
        onClick={() => {
          const newWindow = window.open('/', '_blank')
          if (newWindow) {
            // @ts-ignore
            newWindow.rtcEngine = window.rtcEngine
            newWindow.api = window.api
          }
        }}
      >
        open new window
      </button>
    </>
  )
}

export default App
